gdk/frameclock: Make surfaces inhibit freeze
authorJonas Ådahl <jadahl@gmail.com>
Fri, 28 Jun 2019 16:45:44 +0000 (18:45 +0200)
committerJonas Ådahl <jadahl@gmail.com>
Wed, 3 Jul 2019 09:42:28 +0000 (11:42 +0200)
commit5db079b052fcb934566f69ea49dd7fc3f6314813
tree3fd6be1c439e9c0bcf3d0c9422b593ea359a1618
parenta2ff6af4b32b9fb2e90c50c94cdea5ef1ae921c9
gdk/frameclock: Make surfaces inhibit freeze

To make a frame clock tick as long as any of the associated surfaces
expect to receive ticks, make the surfaces inhibit freezing the clock,
instead of directly tell the frame clock to freeze itself.

This makes it so that as long as any surface using a certain frame clock
is not frozen (e.g. just received a frame event from the display
server), the frame clock will not be frozen.

With this, the frame clock is initiated as frozen, and won't be thawed
until any surface inhibits freeze. It will be frozen again, when every
surface has that previously inhibited freeze uninhibited freeze.
gdk/broadway/gdksurface-broadway.c
gdk/gdkframeclock.c
gdk/gdkframeclockprivate.h
gdk/gdksurface.c
gdk/gdksurfaceprivate.h
gdk/wayland/gdksurface-wayland.c
gdk/x11/gdkdisplay-x11.c
gdk/x11/gdksurface-x11.c